<?php

/**
 * custom query form
 *
 * @author     Mon Zafra <monzee at gmail>
 * @copyright  (c)2009 Mon Zafra
 * @category   Mz
 * @package    modules
 * @subpackage crud
 * @license    http://mz-project.googlecode.com/svn/trunk/LICENSE    MIT License
 * @version    SVN: $Id: DbQuery.php 22 2009-05-08 17:08:41Z monzee $
 */
class Crud_Form_DbQuery extends Zend_Form
{
    public function init()
    {
        $decors = array(
            array('ViewHelper', array('separator' => '')),
            array('Label', array('separator' => '')),
            array('Errors', array('separator' => '')),
        );

        $this->setAttrib('class', 'mz-dl-form')

            ->addElement('textarea', 'query', array(
                'class' => 'text',
                'label' => 'Query',
                'required' => true,
                'decorators' => $decors,
            ))

            ->addElement('submit', 'submit', array(
                'class' => 'button',
                'label' => 'Execute',
                'ignore' => true,
                'decorators' => $decors,
            ))
        ;
    }

}
